(transient-mark-mode): New command.
authorRichard M. Stallman <rms@gnu.org>
Sat, 15 May 1993 18:47:18 +0000 (18:47 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 15 May 1993 18:47:18 +0000 (18:47 +0000)
lisp/simple.el

index db499b4f5a4fbb72a8f3f9efd69d32f48afd8c9b..b3a0870ea4cab778779c3236fb4e9d1b53c11d81 100644 (file)
@@ -1289,6 +1289,18 @@ and it reactivates the mark."
     (set-mark (point))
     (goto-char omark)
     nil))
+
+(defun transient-mark-mode (arg)
+  "Toggle Transient Mark mode.
+With arg, turn Transient Mark mode on if and only if arg is positive.
+
+In Transient Mark mode, changing the buffer \"deactivates\" the mark.
+While the mark is active, the region is highlighted."
+  (interactive "P")
+  (setq transient-mark-mode
+       (if (null arg)
+           (not transient-mark-mode)
+         (> (prefix-numeric-value arg) 0))))
 \f
 (defvar next-line-add-newlines t
   "*If non-nil, `next-line' inserts newline to avoid `end of buffer' error.")